<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<c:set var="path" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
	"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>校园宿舍管理系统</title>
<link href="${path }/css/style.css" 
	rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${path }/js/checkForm.js" 
	charset="gb2312"></script>
<meta http-equiv="Content-Type" 
	content="text/html;charset=gb2312"/>
</head>

<body>
<center>
<table class="out">
<tr>
    <td class="title">校园宿舍管理系统</td>
</tr>
<tr>
    <td class="subtitle">&nbsp;</td>
</tr>
<tr>
    <td class="content">
    <table class="out">
    <tr>
      	<td class="left" >
        	<%@ include file="left.jsp"%>
     	</td>
     	
      	<td class="right">
      	<table class="rightTable"> 
        <tr>
            <td class="mainMenu">学生入住登记</td>
        </tr>
        <tr>
            <td class="rightout">
            <form name="form1" method="post" action="saveStuDom.do"
            	 onSubmit="return checkStudentInDom()" >
            <table class="fullTable">
            <tr class="inputTr">
                <td class="inputLeft">&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="inputLeft">
                	<span class="leftSpan">*</span>楼宇：</td>
                <td>
                	<select name="bId" onChange="changeBuildingStuDom()">              		
                	<option value="">请选择宿舍楼</option>
                	<c:forEach items="${buildingList }" var="building">
                	<c:if test="${building.id==currentBuilding.id }">
                		<option value="${building.id }" selected="selected">${building.name }</option>
                	</c:if>
                	<c:if test="${building.id!=currentBuilding.id }">
                		<option value="${building.id }">${building.name }</option>
                	</c:if>
                	</c:forEach>
                	</select>
                </td>
            </tr>
            <tr>
              	<td class="inputLeft"><span class="leftSpan">*</span>寝室：</td>
              	<td>
              		<select name="dId">
              		<option value="">请选择宿舍</option>
					<c:forEach items="${domitoryList }" var="domitory">
					<option value="${domitory.id }">${domitory.name }</option>
					</c:forEach>
              		</select>
              	</td>
            </tr>
            <tr>
              	<td class="inputLeft">
              	<span class="leftSpan">*</span>学生学号：</td>
              	<td>
              		<select name="sId">
              		<option value="">请选择学生</option>
              		<c:forEach items="${outSutdentList }" var="student">
              		<option value="${student.id }">${student.name }</option>
              		</c:forEach>
              		</select>
              	</td>               	
            </tr>
            <tr>
              	<td class="inputLeft">&nbsp;</td>
              	<td><input type="submit" value="确定入住"></td>
            </tr>
            </table>
            </form>
            </td>
        </tr>
       	</table>
       	</td>
    </tr>
    </table>
    </td>
</tr>
<tr>
    <td class="bottom">&nbsp;</td>
</tr>
</table>
</center>
</body>
</html>